The incident took place in Suffolk County at Westhampton Beach Middle School on Thursday, June 2.
The 13-year-old boy told other students and school officials that he was going to "shoot the school" because he was annoyed and frustrated with other students, said Chief Steven McManus of the Westhampton Police.
"The teenager made reference to the recent Uvalde, Texas shooting," McManus said.
McManus added that the student, who is not being named due to his age, was sick of being picked on by other students and this was "his way to solve the problem."
The incident was reported by school officials to the school resource officers and was then investigated by the department's criminal investigation unit, McManus said.
The teen was arrested around 1:30 p.m. and charged with making a terroristic threat and aggravated harassment. He will appear in a family court at a later date.
Although there was no "specific" threat, the chief said there would be an increased presence at all schools in the district.
Also on Long Island, a Riverhead High School student who was arrested by Riverhead Police on Wednesday, June 1 for making a terroristic threat after also threatening to "shoot up his school," was arrested again on Thursday, June 2, for making another threat, the Riverhead Police said.
According to Riverhead Police, the 15-year-old allegedly made threats on his Instagram account threatening to "send shots flying at the school."
He is being held at the Juvenile Detention Center until his next hearing, police said.
Click here to follow Daily Voice Norwalk and receive free news updates.